import request from "@/utils/request.ts";
import type {
  GetTrackdemarkListApiResponse,
  TrackdemarkItem,
} from "@/api/types/trademark.ts";
//获取数据的Api
export const trademarkDataApi = (page: number, limit: number) => {
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  return request.get<any, GetTrackdemarkListApiResponse>(
    `/admin/product/baseTrademark/${page}/${limit}`
  );
};
//添加数据的Api
export const trademarkAddApi = (logoUrl: string, tmName: string) => {
  return request.post<any, null>("/admin/product/baseTrademark/save", {
    logoUrl,
    tmName,
  });
};
//修改数据的Api
export const trademarkUpdateApi = (trademark: TrackdemarkItem) => {
  return request.put<any, null>(
    "/admin/product/baseTrademark/update",
    trademark
  );
};
//删除的数据Api
export const trademarkDeleteApi = (id: number) => {
  return request.delete<any, null>(`/admin/product/baseTrademark/remove/${id}`);
};
